<template>
  <div>home
      <button @click="handleClick">{{city}}</button>
  </div>
</template>

<script>
export default {
    data(){
        return {
            city:"花山"
        }
    },
    methods:{
        handleClick(){
            this.$router.push('/city')
        }
    },
    mounted(){
        var city = localStorage.getItem('city');
        if(city){
            this.city = city
        }
    }
}
</script>

<style>

</style>